package com.ycc.springcloud.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true) //链式写法
@TableName(value = "dept")
public class Dept implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long deptno;//主键
    private String deptname;//部门名称
    private String db_source;


    public Dept() {
    }

    public Dept(String deptname){
        this.deptname=deptname;
    }

    public Dept(String deptname, String db_source) {
        this.deptname = deptname;
        this.db_source = db_source;
    }

    public Dept(Long deptno, String deptname, String db_source) {
        this.deptno = deptno;
        this.deptname = deptname;
        this.db_source = db_source;
    }
}
